"""
图像识别模型模块
用于集成和管理图像识别AI模型
"""

from typing import Union
from langchain_community.llms import Ollama


def get_image_recognition_model(model_type: str = "llava") -> Union[Ollama, None]:
    """
    获取图像识别模型实例
    
    Args:
        model_type: 模型类型 ("llava", "bakllava")
        
    Returns:
        图像识别模型实例
    """
    if model_type == "llava":
        return Ollama(model="llava")
    elif model_type == "bakllava":
        return Ollama(model="bakllava")
    else:
        raise ValueError(f"不支持的模型类型: {model_type}")